package com.ruoyi.project.pandian.record.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.pandian.record.mapper.PdRecordMapper;
import com.ruoyi.project.pandian.record.domain.PdRecord;
import com.ruoyi.project.pandian.record.service.IPdRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 盘点记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-13
 */
@Service
public class PdRecordServiceImpl implements IPdRecordService 
{
    @Autowired
    private PdRecordMapper pdRecordMapper;

    /**
     * 查询盘点记录
     * 
     * @param pdGuid 盘点记录主键
     * @return 盘点记录
     */
    @Override
    public PdRecord selectPdRecordByPdGuid(String pdGuid)
    {
        return pdRecordMapper.selectPdRecordByPdGuid(pdGuid);
    }

    /**
     * 查询盘点记录列表
     * 
     * @param pdRecord 盘点记录
     * @return 盘点记录
     */
    @Override
    public List<PdRecord> selectPdRecordList(PdRecord pdRecord)
    {
        return pdRecordMapper.selectPdRecordList(pdRecord);
    }

    /**
     * 新增盘点记录
     * 
     * @param pdRecord 盘点记录
     * @return 结果
     */
    @Override
    public int insertPdRecord(PdRecord pdRecord)
    {

        return pdRecordMapper.insertPdRecord(pdRecord);
    }

    /**
     * 修改盘点记录
     * 
     * @param pdRecord 盘点记录
     * @return 结果
     */
    @Override
    public int updatePdRecord(PdRecord pdRecord)
    {
        return pdRecordMapper.updatePdRecord(pdRecord);
    }

    /**
     * 批量删除盘点记录
     * 
     * @param pdGuids 需要删除的盘点记录主键
     * @return 结果
     */
    @Override
    public int deletePdRecordByPdGuids(String pdGuids)
    {
        return pdRecordMapper.deletePdRecordByPdGuids(Convert.toStrArray(pdGuids));
    }

    /**
     * 删除盘点记录信息
     * 
     * @param pdGuid 盘点记录主键
     * @return 结果
     */
    @Override
    public int deletePdRecordByPdGuid(String pdGuid)
    {
        return pdRecordMapper.deletePdRecordByPdGuid(pdGuid);
    }
}
